package sdufe.lele.result;

import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by geniee on 17-4-21.
 */

@Repository
public class ListResult extends Result {

    private List<Object> data;


    public ListResult() {
        super(200);
        this.data = new ArrayList();

    }

    public ListResult(List list){
        super(200);

        this.data.addAll(list);
    }

    public List getData() {
        return data;
    }

    public void setData(List data) {
        this.data = data;
    }

    public void set(Object object) {
        data.add(object);
    }
    public void setAll(List list){
        data.addAll(list);
        // todo 为什么？
    }
}
